以下是包括数据预处理、模型训练和评估的完整代码示例：

```python
from transformers import BertTokenizer, BertForSequenceClassification, get_linear_schedule_with_warmup
from torch.utils.data import Dataset, DataLoader
import torch
from sklearn.model_selection import train_test_split
import numpy as np

# 设定设备
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

# 加载预训练的tokenizer和模型
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
model = BertForSequenceClassification.from_pretrained('bert-base-uncased', num_labels=2).to(device)

# 假设你已经有了带标签的数据
texts = ["Hello, I'm a text example.", "Another text example..."]
labels = [0, 1]  # 0 - 非敏感，1 - 敏感

# 将数据划分为训练集和测试集
train_texts, test_texts, train_labels, test_labels = train_test_split(texts, labels, test_size=.2)

# 定义一个PyTorch数据集
class SensitiveDataset(Dataset):
    def __init__(self, texts, labels, tokenizer, max_len=512):
        self.texts = texts
        self.labels = labels
        self.tokenizer = tokenizer
        self.max_len = max_len

    def __len__(self):
        return len(self.texts)

    def __getitem__(self, idx):
        text = self.texts[idx]
        label = self.labels[idx]
        encoding = self.tokenizer.encode_plus(
          text,
          add_special_tokens=True,
          max_length=self.max_len,
          return_token_type_ids=False,
          padding='max_length',
          return_attention_mask=True,
          return_tensors='pt',
        )
        return {
          'text': text,
          'input_ids': encoding['input_ids'].flatten(),
          'attention_mask': encoding['attention_mask'].flatten(),
          'label': torch.tensor(label, dtype=torch.long)
        }

# 创建DataLoader
train_dataset = SensitiveDataset(train_texts, train_labels, tokenizer)
test_dataset = SensitiveDataset(test_texts, test_labels, tokenizer)

train_loader = DataLoader(train_dataset, batch_size=16, shuffle=True)
test_loader = DataLoader(test_dataset, batch_size=16, shuffle=False)

# 创建优化器和学习率调度器
optimizer = torch.optim.Adam(model.parameters(), lr=1e-5)
total_steps = len(train_loader) * 10  # 假设训练10个epoch
scheduler = get_linear_schedule_with_warmup(optimizer, num_warmup_steps=0, num_training_steps=total_steps)

def eval_model(model, data_loader):
    model.eval()
    val_loss = []
    val_accuracy = []

    for batch in data_loader:
        input_ids = batch['input_ids'].to(device)
        attention_mask = batch['attention_mask'].to(device)
        labels = batch['label'].to(device)

        with torch.no_grad():
            outputs = model(input_ids=input_ids, attention_mask=attention_mask, labels=labels)

        loss = outputs[0]
        val_loss.append(loss.item())

        preds = torch.argmax(outputs[1], dim=1).flatten()
        accuracy = (preds == labels).cpu().numpy().mean() * 100
        val_accuracy.append(accuracy)

    return np.mean(val_loss), np.mean(val_accuracy)

best_accuracy = 0
for epoch in range(10):  # 进行10次迭代
    model.train()
    train_loss = []
    for batch in train_loader:
        input_ids = batch['input_ids'].to(device)
        attention_mask = batch['attention_mask'].to(device)
        labels = batch['label'].to(device)

        outputs = model(input_ids=input_ids, attention_mask=attention_mask, labels=labels)
        loss = outputs[0]
        train_loss.append(loss.item())

        loss.backward()
        optimizer.step()
        scheduler.step()  # 更新学习率
        optimizer.zero_grad()

    val_loss, val_accuracy = eval_model(model, test_loader)
    print(f"Validation Loss: {val_loss}")
    print(f"Validation Accuracy: {val_accuracy}")

    if val_accuracy > best_accuracy:
        torch.save(model.state_dict(), 'best_model_state.bin')
        best_accuracy = val_accuracy
```

这段代码在每个epoch结束时都会评估模型在验证集上的性能，并且当模型在验证集上达到最佳性能时保存模型。同时，学习率调度器使得我们可以在训练过程中动态地调整学习率。

请注意，这是一个基础的示例，在实际应用中可能需要根据你的具体需求和可用的资源进行更多的调整和优化。